import { defineStore } from "pinia";

export const useEditorStore = defineStore("editor", {
  state: () => {
    return {
        catalog: null, // 目录数据
        editorId: 'detail-page-preview-only',
        scrollElement: document.documentElement
    };
  },
  actions: {
    updateCatelog(newCatalog) {
      // 更新目录数据
      this.catalog = newCatalog;
    },
  },
});
